home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / DRAWTBOX.DMO < prev    next >
Text File  |  1996-07-04  |  4KB  |  71 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   DRAWTBOX.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. $INCLUDE "DAS-NB01.INC"
  19. $INCLUDE "DAS-NBT1.INC"
  20. SCREEN 0,,0,0               ' just to make sure
  21. WIDTH 80,25
  22. CLS                         '
  23. VIDEOsetup                  ' gotta set-up the environment
  24. ? "┌────────────────────────────────────────────────────────────────────────
  25. ? "│ TBoxDRAW ( Row?, Col?, Rows?, Cols?, Border%, Attr? )
  26. ? "├─────────────────────────────────────────────────────────────────────────────
  27. ? "│ Draws 12 different box styles to an area of the screen in Attr? color.
  28. ? "│ SEE the help screen for the different box styles associated with Border%
  29. ? "└─────────────────────────────────────────────────────────────────────────────
  30.  
  31. Row? = 7 : Col? =  1  : A? = 0               ' border 0 is "no border"
  32. FOR Brdr% = 1 TO 9                           ' watch the action as the bottom
  33.   INCR A?                                    ' new attribute
  34.   TBoxDRAW Row?, Col?, 10, 20, Brdr%, A?     ' of the screen is reached
  35.   Tprint Row?+1,Col?+1, str$(Brdr%), 15      '
  36.   INCR Col?, 5                               '
  37.   INCR Row?, 1                               '
  38. NEXT                                         '
  39. TBoxDRAW Row?+2, Col?, 8, 20, 177, A?        ' use any ASCII character
  40. Tprint Row?+3, Col?+2, "ASCII BORDERS", 15   ' > CHR$(13) too!
  41.                                              '
  42. TBoxDRAW 6, 51, 5, 13, 10, 7                 ' #10 & #11 make pull-down
  43.   Tprint 8, 53, "Border 10", 0
  44. TBoxDRAW 6, 65, 5, 13, 11, 7                 ' menu boxes
  45.   Tprint 8, 67, "Border 11", 0
  46.                                              '
  47. TBoxDRAW 24,  2, 2, 27, 12, 9                ' #12 makes a good shadow
  48. Tprint 24, 1," PRESS <ƒSPACE> TO CONTINUE ", 27 '
  49.  
  50. SCREEN 0,,1,0        ' Apage now #1
  51. CLS
  52. ? "┌────────────────────────────────────────────────────────────────────────
  53. ? "│ SetTBorder ( BorderNo?, Border$ )
  54. ? "├────────────────────────────────────────────────────────────────────────
  55. ? "│ Just in case I didn't get your favorite(s), here is your window into
  56. ? "│ the data that TBoxDRAW uses. Just define your favorite border type
  57. ? "│ and stuff it into the border number of your choice or add it by using
  58. ? "│ border N° 13.
  59. ? "└────────────────────────────────────────────────────────────────────────
  60.  
  61. Border$ = "┬─┐││┴─┘├─┤┬│┴┼"                        ' menu slider box
  62. SetTBorder 13, Border$                             ' set border N° 13
  63. TBoxDRAW 10,  2, 10, 20,  1,  7                    ' a regular "menu" box
  64. TBoxDRAW 10, 21, 10,  3, 13, 14                    ' the new style box
  65. '──────────────────────────────────────────────────┤
  66. Tprint 13, 45, "Draw box w/out filling", 14        ' print to the screen
  67. TBoxDRAW 10, 43, 10, 26, -2, 1                     ' draw a box w/out
  68. '──────────────────────────────────────────────────┤
  69. fAnyKey                                            ' pause for effect
  70. TboxCopy 1, 1, 25, 80, pbvScrnApage, pbvScrnVpage  ' copy Apage to Vpage
  71. SCREEN ,,0,0